Computers and other systems have used disk drives for many years to store digital information. This is because while computers and other systems may have sufficient host memory (such as random access memory) to perform ongoing computational tasks, storing large amounts of data, be it an operating system, application programs, or program data, is impractical using anything except a mass storage device such as a disk drive.
FIG. 1 illustrates a typical prior art computer system 100 that includes a main memory 102 for storing programs and data used by a processor 104. The system 100 further includes auxiliary systems that are generically shown as a chipset 106. The chipset 106 includes a host controller 108 that assists data integration with a disk drive 110. The disk drive 110 includes drive electronics 112 that includes a buffer memory 114. Typically, the buffer memory 114 is a dynamic random access memory (DRAM) of 2 MB-8 MB. Data is passed between the host controller 108 and the drive electronics 112 via a bi-directional bus 116. To enable integration of the various components of the system 100, that system operates under the control of an operating system 118.
Speed is often an important consideration in computer systems, particularly in real-time computing. An important factor in the speed of a computer system is how fast a processor 104 can access data on a disk drive 110. Consequently, a significant amount of attention has been given to improving data access.
While there are many types of disk drives 104, including floppy disks and optical disks, probably the most widely used is the hard disk drive. A hard disk drive can record massive amounts of digital information on concentric memory tracks of a magnetic medium that coats one or more disks. The digital information is recorded as magnetic transitions within the magnetic medium. The disks are mounted on a spindle and turned at very high speeds by a spindle motor. Information on the disks is accessed using magnetic read/write heads located on pivoting arms that move the read/write heads over the disks.
Hard disk drives require more than just mechanical components. Modern hard disk drives include sophisticated drive electronics 112 that include an interface for receiving and transmitted signals and data from and to external devices, such as the host controller 108, and a Head Disk Assembly Interface (not shown) for interfacing the drive electronics 112 to a head disk assembly (also not shown). The head disk assembly includes the disks, the read/write head(s), the spindle motor that rotates the disks, a servo-operated actuator arm that moves the read/write head(s), and other disk drive components. The drive electronics 112 also include servo drivers to move the actuator arms, motor drivers to drive the spindle motor, write drivers to drive the read/write head(s) to write data, an amplifier to amplify data being read, logic to determine where particular data is to be written to or read from, and data formatting electronics to convert incoming data to the proper format for writing and for converting outgoing data to the proper format for the external system. Generally, the drive electronics 112 are operated under the control of a processor. To improve speed and performance, modern drive electronics include the buffer memory 114 (RAM) for temporary storing data.
In addition to improvements to disk drives 110, techniques for efficiently accessing data on the disk drives 110 have been developed. For example, some computer systems incorporate data pre-fetching. That is, when a host controller 108 requests specific data, that specific data plus data at a location or locations (sectors) around the location of the specific data is read and temporarily stored in buffer memory 114. The reason for doing this is that if data at one location is read, the next read is likely to be for data at the next location. For clarity, the specifically requested data will be referred to as required data while the additional data will be referred to as pre-fetched data. Since after reading the required data, a read/write head is already in position to read data at an adjacent location, it can be more efficient to just go ahead and read and temporarily store data, that is, pre-fetch data, at the adjacent location or locations. If pre-fetched data is not requested it can be erased from buffer memory. This technique has proven itself to be highly useful. A typical pre-fetching scheme might be to pre-fetch 4 kB of data. If used, such a pre-fetch will save time, say 48 microseconds of access time.
In the prior art, pre-fetching is performed in two general ways. First, by automatically increasing the amount of data that is read after each read request. This approach has the drawback that if the pre-fetched data is not used, the time required to pre-fetch is wasted. This is because in the prior art all data, the required and the pre-fetched, is first obtained and then the required data is sent. The second approach is to have the host controller receive directions to obtain required data followed by a second request to receive pre-fetch data. In that case, the host controller 108 commands a read of the required data and then the host controller 108 follows that up with another command to pre-fetch data. The second approach has the draw back that separate pre-fetch commands must follow each command to read required data.
Since both approaches have their disadvantages, the first because pre-fetching may not be efficient and the second because multiple requests and commands must be asserted, a new method and apparatus for pre-fetching would be beneficial.